﻿<ResourceDictionary 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:OpenWPFChart.Helpers.ChooseColorDialog">
	
	<Style TargetType="{x:Type local:RainbowColorPicker}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate>
					<Border Background="{TemplateBinding Background}"
						BorderBrush="{TemplateBinding BorderBrush}"
						BorderThickness="{TemplateBinding BorderThickness}">
						<Grid Margin="{TemplateBinding Padding}">
							<Grid.ColumnDefinitions>
								<ColumnDefinition />
								<ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions>
							
							<local:RainbowBox 
								x:Name="PART_RainbowBox"
								Margin="0,5,0,5"/>
							<local:LuminositySlider 
								x:Name="PART_LuminositySlider" Grid.Column="1"
								BaseColor="{Binding ElementName=PART_RainbowBox, Path=SelectedColor}"
								Orientation="Vertical"
								Margin="5,0,0,0"/>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>